<template>
  <div>
    <el-form ref="ruleFormRef" style="max-width: 600px" :model="ruleForm" :rules="rules" label-width="auto"
                class="demo-ruleForm" :size="formSize" status-icon>
                <el-form-item label="部门" prop="departmentId">
                    <el-select v-model="ruleForm.departmentId" placeholder="Activity zone" style="width: 200px;"
                        @change="selechange">
                        <el-option :label="item.name" :value="item.id" v-for="item in bumendata" />
                    </el-select>
                </el-form-item>
    </el-form>
    <p>假期类型</p>
    <el-table :data="tableData" style="width: 100%">
    <el-table-column prop="leaveType" label="类型" width="180">
        <template #default="scope">
            <div>
                {{ scope.row.leaveType==="60000"?'年假': scope.row.leaveType==="60100"?'事假': scope.row.leaveType==="60200"?'病假': scope.row.leaveType==="60300"?'婚假': scope.row.leaveType==="60500"?'产假': scope.row.leaveType==="60600"?'奖励产假': scope.row.leaveType==="60700"?'陪产假': scope.row.leaveType==="60800"?'探亲假': scope.row.leaveType==="60900"?'工伤假': scope.row.leaveType==="61000"?'产检假': scope.row.leaveType==="61100"?'流产假':'长期病假' }}
            </div>
        </template>
    </el-table-column>
    <el-table-column prop="isEnable" label="是否可用" width="180">
        <template #default="scope">
            <el-switch v-model="scope.row.isEnable" />
        </template>
    </el-table-column>
  </el-table>
  </div>
</template>

<script setup lang="ts">
    import { ref } from 'vue'
    import {getLeaveSetting} from '../../api/attendance'
    const tableData = ref([])
    getLeaveSetting(1).then(res=>{
        tableData.value=res.data.data
        console.log(tableData.value);
        
    })
    defineProps(['ruleForm',"rules","formSize","bumendata"])
    const selechange=()=>{
        
    }
</script>

<style scoped></style>
